/* 2014/8/17 */
package com.cosmos.quartz.control.xml;

import com.cosmos.quartz.control.ControlRequest;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

@XStreamAlias("request")
public class XmlControlRequest {
	
	@XStreamAlias("job")
	private String jobName;
	
	@XStreamAlias("operation")
	private String operation;
	
	@XStreamOmitField
	private String filePath;

	public XmlControlRequest() {
		
	}
	
	public XmlControlRequest(ControlRequest request) {
		jobName = request.getJobName();
		operation = request.getOperation();
	}
	
	public ControlRequest toBaseRequest() {
		ControlRequest request = new ControlRequest();
		request.setJobName(jobName);
		request.setOperation(operation);
		return request;
	}
	
	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

}
